namespace SmartMathLibrary.DataMining.ClusterAnalysis
{
    /// <summary>
    /// Interface to implement a SelfOrganisingMapNeuron class.
    /// </summary>
    public interface ISelfOrganisingMapNeuron
    {
        /// <summary>
        /// Gets or sets the x position of the neuron.
        /// </summary>
        /// <value>The x position of the neuron.</value>
        int X { get; set; }

        /// <summary>
        /// Gets or sets the y position of the neuron.
        /// </summary>
        /// <value>The y position of the neuron.</value>
        int Y { get; set; }

        /// <summary>
        /// Gets or sets the weights of the neuron.
        /// </summary>
        /// <value>The weights of the neuron.</value>
        double[] Weights { get; set; }

        /// <summary>
        /// Updates the weights.
        /// </summary>
        /// <param name="pattern">The pattern.</param>
        /// <param name="winner">The winner.</param>
        /// <param name="it">The current iteration.</param>
        /// <returns>The average of the weights.</returns>
        double UpdateWeights(double[] pattern, SelfOrganisingMapNeuron winner, int it);
    }
}